package com.hck.infrastructure.persistent.dao;

import com.hck.infrastructure.persistent.po.HealthConsultation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 健康諮詢表數據訪問接口
 */
@Mapper
public interface IHealthConsultationDao {
    void insert(HealthConsultation consultation);
    HealthConsultation selectById(Long id);
    List<HealthConsultation> selectByUserId(Long userId);
    List<HealthConsultation> selectByDoctorId(Long doctorId);
    void updateStatus(@Param("id") Long id, @Param("status") String status, @Param("replyTime") java.util.Date replyTime, @Param("closeTime") java.util.Date closeTime);
    
    /**
     * 统计用户咨询总数
     */
    Long countByUserId(@Param("userId") Long userId);
    
    /**
     * 分页查询用户咨询列表
     */
    List<HealthConsultation> selectByUserIdPage(@Param("userId") Long userId, @Param("offset") Integer offset, @Param("limit") Integer limit);
    
    /**
     * 统计医生咨询总数
     */
    Long countByDoctorId(@Param("doctorId") Long doctorId);
    
    /**
     * 分页查询医生咨询列表
     */
    List<HealthConsultation> selectByDoctorIdPage(@Param("doctorId") Long doctorId, @Param("offset") Integer offset, @Param("limit") Integer limit);
} 